#include <iostream>
#include <vector>
#include <string>
#include <set>
using namespace std;
int main()
{
    int n;
    cin >> n;
    string s;
    set<string> res;
    for (size_t i = 0; i < n; i++)
    {
        cin >> s;
        res.insert(s);
    }
    for (auto i = res.begin(); i != res.end(); i++)
    {
        cout << *i << endl;
    }
    
}